// format: left: referrerId; right: schoolId
// if both schoolId and referrerId less than 65535, combine them as a int32 then convert to hex string
// else, schoolId hex string and referrerId hex string, joined by '.'
export const generateCode = (referrerId, schoolId) => {
    return schoolId > 65535 || referrerId > 65535 ?
        [referrerId.toString(16), schoolId.toString(16)].join('.') :
        ((referrerId << 16) | schoolId).toString(16);
};
